import Vue from 'vue'
import Router from 'vue-router'
// 登陆界面
import Login from './components/Login/Login.vue'
import Login2 from './components/Login/Login2.vue'
import Regist from './components/Login/Regist.vue'
import Alter from './components/Login/Alter.vue'
// 主界面
import Main from './components/Main/Main.vue'
import Home from './components/Main/Main/Home.vue'
import Question from './components/Main/Main/Question.vue'
import Ward from './components/Main/Main/Ward.vue'
import Me from './components/Main/Main/Me.vue'
// 查看问题
import WatchQuestion from './components/Watch/WatchQuestion.vue'
// 问题详情
import questionContent from './components/Watch/questionContent.vue'
// 提问
import Ask from './components/Watch/ask.vue'
Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/Login2',
      name: 'Login2',
      component: Login2
    },
    {
      path: '/Regist',
      name: 'Regist',
      component: Regist
    },
    {
      path: '/Alter',
      name: 'Alter',
      component: Alter
    },
    {
      path: '/Main',
      component: Main,
      children: [
        {
          path: '/',
          name: 'Home',
          component: Home
        },
        {
          path: '/Question',
          name: 'Question',
          component: Question
        },
        {
          path: '/Ward',
          name: 'Ward',
          component: Ward
        },
        {
          path: '/Me',
          name: 'Me',
          component: Me
        },
        {
          path: '/WatchQuestion',
          name: 'WatchQuestion',
          component: WatchQuestion
        },
        {
          path: '/questionContent',
          name: 'questionContent',
          component: questionContent
        },
        {
          path: '/ask',
          name: 'ask',
          component: Ask
        }
      ]
    }
  ]
})
